package com.kun.dynamic.core;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 动态数据源切换核心类
 *
 * @author lk
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    /**
     * 获取key
     *
     * @return
     */
    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDsHolder.getValue();
    }
}
